package com.by.basicweb.config;

import com.by.basicweb.converter.ZipHttpMessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

/**
 * web服务设置
 *
 * @author YanBingHao
 * @since 2024/1/17
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Bean
    public ZipHttpMessageConverter zipHttpMessageConverter() {
        return new ZipHttpMessageConverter();
    }

    @Override
    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
        converters.add(zipHttpMessageConverter());
    }

}